Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Error code</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Error_code"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Error_code rootpage-Error_code skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Error code</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Error_correction_code" title="Error correction code">Error correction code</a>.</div>
<p>In <a href="Computing" title="Computing">computing</a>, an <b>error code</b> (or a <b>return code</b>) is a numeric or <a href="Alphanumericals" title="Alphanumericals">alphanumeric</a> code that indicates the nature of an error and, when possible, why it occurred.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Error codes can be reported to end users of software, returned from <a href="Communication_protocol" title="Communication protocol">communication protocols</a>, or used within programs as a method of representing anomalous conditions.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="In_consumer_products">In consumer products</h2></div>

<p>Error codes are commonly encountered on displays of consumer electronics to users in order to communicate or specify an error. They can also be indicated by lights or beeps, e.g., if a device does not have a display. They are commonly reported by consumer electronics when users bring electronics to perform tasks that they cannot do (e.g., <a href="Division_by_zero" title="Division by zero">dividing by zero</a>), or when the program within a device encounters an anomalous condition.
</p><p>Error codes reported by consumer electronics are used to help diagnose and repair technical problems. An error code can be communicated to relevant support staff to identify potential fixes, or can simplify research into the cause of an error.
</p><p>There is no definitive format for error codes, meaning that error codes typically differ from/between products and or companies.
</p>
<div class="mw-heading mw-heading2"><h2 id="In_computer_programming">In computer programming</h2></div>
<p>Error codes in computers can be passed to the system itself, to judge how to respond to the error. Often error codes come synonymous with an <a href="Exit_status" title="Exit status">exit code</a> or a return value. The system may also choose to pass the error code to its user(s). The <a href="Blue_screen_of_death" title="Blue screen of death">Blue screen of death</a> is an example of how the <a href="Microsoft_Windows" title="Microsoft Windows">Windows operating system</a> communicates error codes to the user.
</p><p>Error codes can be used within a computer program to represent an anomalous condition. A computer program can take different actions depending on the value of an error code.
</p><p>Different programming languages, operating systems, and programming environments often have their own conventions and standards for the meanings and values of error codes. Examples include:
</p>
<ul><li><a href="Unix-like" title="Unix-like">Unix-like</a> systems have an <a href="Errno.h" title="Errno.h">errno.h</a> header file that contains the meanings and values of error codes returned by <a href="System_call" title="System call">system calls</a> and library functions.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Windows_API" title="Windows API">Microsoft Windows' application programming interfaces (APIs)</a> have several different standards for error code values, depending on the specific API being used.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></li></ul>
<p>The usage of error codes as an error handling strategy is often contrasted against using <a href="Exception_handling" title="Exception handling">exceptions</a> for error handling.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="In_communication_protocols">In communication protocols</h2></div>
<p><a href="Communication_protocol" title="Communication protocol">Communication protocols</a> typically define a standard set of error codes, as a means of communicating the status or result of an operation between the entities in the system.
</p><p>Several high-level protocols in the <a href="TCP/IP_stack" class="mw-redirect" title="TCP/IP stack">TCP/IP stack</a>, such as <a href="HTTP" title="HTTP">HTTP</a>, <a href="File_Transfer_Protocol" title="File Transfer Protocol">FTP</a>, and <a href="Simple_Mail_Transfer_Protocol" title="Simple Mail Transfer Protocol">SMTP</a>, define their own standard sets of error codes:
</p>
<ul><li><a href="List_of_HTTP_status_codes" title="List of HTTP status codes">List of HTTP status codes</a></li>
<li><a href="List_of_FTP_server_return_codes" title="List of FTP server return codes">List of FTP server return codes</a></li>
<li><a href="Simple_Mail_Transfer_Protocol#Protocol_overview" title="Simple Mail Transfer Protocol">Simple Mail Transfer Protocol §&nbsp;Protocol overview</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="In_automobiles">In automobiles</h2></div>
<p>Error codes in automobiles, sometimes referred to as trouble codes, indicate to a driver or car mechanic what is wrong with a vehicle before repairs are initiated.
</p><p>In <a href="Vehicle" title="Vehicle">vehicles</a> with <a href="CAN_bus" title="CAN bus">CAN buses</a>, error codes are often five-digit codes that pinpoint a particular car fault. Car owners can make use of an <a href="On-board_diagnostics" title="On-board diagnostics">on-board diagnostics</a> scanner or an owner's manual to identify the meaning of a trouble code. Five-digit diagnostic trouble codes typically consist of one letter and four numbers (e.g. P0123).
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Abort_(computing)" title="Abort (computing)">Abort (computing)</a></li>
<li><a href="Aspect-oriented_programming" title="Aspect-oriented programming">Aspect-oriented programming</a></li>
<li><a href="Blue_Screen_of_Death" class="mw-redirect" title="Blue Screen of Death">Blue Screen of Death</a></li>
<li><a href="Errno.h" title="Errno.h">errno.h</a>, a header file in C that defines macros for reporting errors</li>
<li><a href="Exit_status" title="Exit status">Exit status</a></li>
<li><a href="Failure" title="Failure">Failure</a></li>
<li><a href="HRESULT" title="HRESULT">HRESULT</a>, a computer programming <a href="Data_type" title="Data type">data type</a> used for error codes</li>
<li><a href="Static_code_analysis" class="mw-redirect" title="Static code analysis">Static code analysis</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.computerhope.com/jargon/e/errorcode.htm">"What is an Error Code?"</a>. <i>ComputerHope.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-01-22</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://support.xbox.com/en-US/help/errors/xbox-360/error-code-e74">"Xbox Support"</a>. <i>support.xbox.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-03-12</span></span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="http://man.cat-v.org/unix_7th/2/intro">intro(2)</a></code></span>&nbsp;–&nbsp;<a href="Version_7_Unix" title="Version 7 Unix">Version 7 Unix</a> Programmer's <a href="Man_page" title="Man page">Manual</a></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/errno.3">errno(3)</a></code></span>&nbsp;–&nbsp;<a href="Linux" title="Linux">Linux</a> Programmer's <a href="Man_page" title="Man page">Manual</a> – Library Functions</span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://docs.oracle.com/cd/E88353_01/html/E37841/intro-2.html">intro(2)</a></code></span>&nbsp;–&nbsp;<a href="Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris 11.4</a> System Calls Reference <a href="Man_page" title="Man page">Manual</a></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/774ca55e-5e94-49ad-8710-c777fc717599">"[MS-ERREF]: Overview"</a>. <i>learn.microsoft.com</i>. 30 March 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-03-12</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite id="CITEREFTylerMSFT2022" class="citation web cs1">TylerMSFT (17 October 2022). <a rel="nofollow" class="external text" href="https://learn.microsoft.com/en-us/cpp/cpp/errors-and-exception-handling-modern-cpp">"Modern C++ best practices for exceptions and error handling"</a>. <i>Learn.Microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-03-12</span></span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://isocpp.org/wiki/faq/exceptions#exceptions-avoid-spreading-out-error-logic">"Standard C++"</a>. <i>IsoCpp.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-03-12</span></span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/ms681381(VS.85).aspx">Microsoft system error codes</a></li>
<li><a rel="nofollow" class="external text" href="http://support.microsoft.com/kb/310123">Microsoft Device Manager error codes</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-04-01" href="https://en.wikipedia.org/wiki/?title=Error_code&amp;oldid=1283449406">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>